//package com.tanjun.publicservice.web.service.flowable.impl;
//
//import com.tanjun.publicservice.web.service.flowable.ProcessInstanceService;
//import org.activiti.engine.RuntimeService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//
//import java.util.HashMap;
//import java.util.Map;
//
//@Service
//public class ProcessInstanceServiceImpl implements ProcessInstanceService {
//    @Autowired
//    private RuntimeService runtimeService;
//
//
//
//    /**
//     * 启动流程
//     *
//     * @param processId   流程id
//     * @param businessKey 业务id
//     * @param userId      用户id
//     * @param variables   流程变量
//     * @return 流程实例id
//     */
//    @Override
//    public String startProcess(String processId, String businessKey, Object userId, Map<String,Object> variables) {
//        if(variables==null){
//            variables=new HashMap<String,Object>();
//        }
//        variables.put("initiator", userId); // 设置流程发起人
//        return runtimeService.startProcessInstanceById(processId,businessKey,variables).getId();
//    }
//}
